OBJ=$(patsubst %.c, %.o, $(wildcard *.c))

CFLAGS += -I./ -I$(LUA)/include -Wall

all : lib $(TEST)
	(cd test && make)
	(cd game && make)

lib : libcomm.a

libcomm.a : $(OBJ)
	ar cru $@ $^

$(TEST): LDLIBS +=-L./ -lcomm

clean :
	(cd test && make clean)
	@rm -vf $(OBJ)
